package spring;

import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.input.MouseEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.net.URL;
import java.util.Date;
import java.util.ResourceBundle;

@Component
public class T2Controller implements Initializable{
    @FXML
   private Button btn1;
@Autowired
T2Model t2Model;

    @Override
    public void initialize(URL location, ResourceBundle resources) {
        System.out.println(resources.getString("A"));
    }

    public void action(MouseEvent mouseEvent) {
        btn1.setText("nothing"+new Date());
        System.out.println(t2Model.id);
    }
}
